'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  /* newer parts: */
  // --------------------------------

  router.post('/add', controller.jspang.add);
  router.post('/del', controller.jspang.del);
  router.post('/editor', controller.jspang.editor);
  router.post('/show', controller.jspang.show);

  router.get('/testGetGirl', controller.home.testGetGril)
  router.post('/addPost', controller.jspang.addPost);
  // set strict parameter format to pass defined in the router (it is more recommended.)
  router.get('/getGirl2/:name/:age', controller.jspang.getGirl2)

  /* // test url for this :  http://127.0.0.1:7001/getGirl?name=a&age=18
  expect: {"name":"a","age":"18"}  to show*/
  router.get('/getGirl', controller.jspang.getGirl);

  /* old */
  router.get('/getGirls', controller.jspang.getGirls);
  router.get('/jspangPageNameInUrl', controller.jspang.indexPage);
  // router.get('/jspang', controller.home.jspang);

  router.get('/', controller.home.index);


};
